/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        int a = 3;
        for (int i = 0; i < 32; i += 2) {
            a >>= i;
            System.out.print((a & 1)+ " ");

        }
        a = 3;
        System.out.println();
        for (int i = 1; i < 32; i += 2) {
            a >>= i;
            System.out.print((a & 1) + " ");



        }
    }
}